#ifndef __BUTTON_H
#define __BUTTON_H

#include <msp430.h>

//button layout:
//	SpeedDown	SpeedUp
//	TimerDown	TimerUp

// buttons:
	// speed_up: PIN P1.0
	// speed_down: PIN 1.1
	// timer_up: PIN 1.3
	// timer_down: PIN 3.1

//PORT 1	
#define BUTTON_SPEED_UP	0
#define BUTTON_SPEED_DOWN	1	
#define BUTTON_TIMER_UP	3
//PORT 3
#define BUTTON_TIMER_DOWN	1	

#define BUTTON_SPEED_UP_PRESSED 0
#define BUTTON_SPEED_DOWN_PRESSED 1
#define BUTTON_TIMER_UP_PRESSED 2
#define BUTTON_TIMER_DOWN_PRESSED 3	

char isButtonSpeedUpPressing(void);
char isButtonSpeedDownPressing(void);
char isButtonTimerUpPressing(void);
char isButtonTimerDownPressing(void);

char isButtonSpeedUpPressed(void);
char isButtonSpeedDownPressed(void);
char isButtonTimerUpPressed(void);
char isButtonTimerDownPressed(void);


//SpeedUp: 0
//SpeedDown: 1
//TimerUp: 2
//TimerDown: 3
extern char ButtonPressed;

#endif
